home *** CD-ROM | disk | FTP | other *** search
/ VRML 2.0 Sourcebook (2nd Edition) / VRML 2.0 Sourcebook CD [md5 fed90f4f9c39d5a60d477058775c7e21].iso / book / mac / ch08 / 08fig03.wrl < prev    next >
Text File  |  1996-09-23  |  900b  |  43 lines

  1. #VRML V2.0 utf8
  2. # The VRML 2.0 Sourcebook
  3. # Copyright 1997 By
  4. # Andrea L. Ames, David R. Nadeau, and John L. Moreland
  5. Group {
  6.     children [
  7.     # Moving box
  8.         DEF Cube Transform {
  9.             children Shape {
  10.                 appearance Appearance {
  11.                     material Material { }
  12.                 }
  13.                 geometry Box { size 1.0 1.0 1.0 }
  14.             }
  15.         },
  16.     # Animation clock
  17.         DEF Clock TimeSensor {
  18.             cycleInterval 4.0
  19.             loop TRUE
  20.         },
  21.     # Animation path
  22.         DEF CubePath PositionInterpolator {
  23.             key [
  24.                 0.00, 0.11, 0.17, 0.22,
  25.                 0.33, 0.44, 0.50, 0.55,
  26.                 0.66, 0.77, 0.83, 0.88,
  27.                 0.99
  28.             ]
  29.             keyValue [
  30.                 0.0 0.0  0.0,  1.0 1.96 1.0,
  31.                 1.5 2.21 1.5,  2.0 1.96 2.0,
  32.                 3.0 0.0  3.0,  2.0 1.96 3.0,
  33.                 1.5 2.21 3.0,  1.0 1.96 3.0,
  34.                 0.0 0.0  3.0,  0.0 1.96 2.0,
  35.                 0.0 2.21 1.5,  0.0 1.96 1.0,
  36.                 0.0 0.0  0.0
  37.             ]
  38.         }
  39.     ]
  40. }
  41. ROUTE Clock.fraction_changed TO CubePath.set_fraction
  42. ROUTE CubePath.value_changed TO Cube.set_translation
  43.